#ifndef MAINWINDOW_H
#define MAINWINDOW_H

# pragma execution_character_set("utf-8")

#include <QMainWindow>
#include <QThread>
#include "qmqtt.h"

QT_BEGIN_NAMESPACE
namespace Ui {
class MainWindow;
}
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();
public slots:
    void pushButton_cb();
    void log(QString text);
    void m_client_connected_cb();
    void m_client_disconnected_cb();
    void m_client_error_cb(const QMQTT::ClientError);
    void m_client_subscribed_cb(const QString&, const quint8);
    void m_client_published_cb(const QMQTT::Message&, quint16);
    void m_client_received_cb(const QMQTT::Message&);


private:
    Ui::MainWindow *ui;
    QMQTT::Client *m_client = NULL;
};
#endif // MAINWINDOW_H
